package com.wing.cabinet.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wing.cabinet.model.entity.StorageInventorySpace;
import com.wing.cabinet.model.response.StorageInventorySpaceVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 暂存柜产品货道库存-Dao
 *
 * @author
 */
@Mapper
public interface StorageInventorySpaceDao extends BaseMapper<StorageInventorySpace> {

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<StorageInventorySpaceVO> list4app(@Param("params") Map<String, Object> params);

    /**
     * 分页列表-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    List<StorageInventorySpaceVO> list4app(@Param("page") Page<StorageInventorySpaceVO> page, @Param("params") Map<String, Object> params);

    List<StorageInventorySpaceVO> list(@Param("page") Page<StorageInventorySpaceVO> page, @Param("params") Map<String, Object> params);

    List<StorageInventorySpaceVO> storageInventorySpaceList(@Param("page") Page<StorageInventorySpaceVO> page, @Param("params") Map<String, Object> params);

    List<StorageInventorySpaceVO> detasList(@Param("page") Page<StorageInventorySpaceVO> page, @Param("params") Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    StorageInventorySpaceVO get4appById(Long id);

    /**
     * 库位列表导出
     * @param params
     * @return
     */
    List<StorageInventorySpaceVO> list(@Param("params") Map<String, Object> params);

    List<StorageInventorySpaceVO> listOptimalSpace4app(@Param("params") Map<String, Object> params);

    /**
     * 根据条件查询统计库存数
     * @param mainCabCode
     * @param cabCode
     * @param skuCode
     * @return
     */
    Integer getSumByParams(@Param("mainCabCode") String mainCabCode,@Param("cabCode") String cabCode,@Param("skuCode") String skuCode);
}
